\doxysection{C\+:/\+Users/\+ASUS/\+Desktop/dm-\/ctrl\+H7-\/balance-\/9025test/modules/motor/servo\+\_\+motor/servo\+\_\+motor.h File Reference}
\hypertarget{servo__motor_8h}{}\label{servo__motor_8h}\index{C:/Users/ASUS/Desktop/dm-\/ctrlH7-\/balance-\/9025test/modules/motor/servo\_motor/servo\_motor.h@{C:/Users/ASUS/Desktop/dm-\/ctrlH7-\/balance-\/9025test/modules/motor/servo\_motor/servo\_motor.h}}


舵机控制头文件  


{\ttfamily \#include "{}main.\+h"{}}\newline
{\ttfamily \#include "{}tim.\+h"{}}\newline
\doxysubsubsection*{Classes}
\begin{DoxyCompactItemize}
\item 
struct \mbox{\hyperlink{struct_servo___angle__s}{Servo\+\_\+\+Angle\+\_\+s}}
\item 
struct \mbox{\hyperlink{struct_servo___init___config__s}{Servo\+\_\+\+Init\+\_\+\+Config\+\_\+s}}
\item 
struct \mbox{\hyperlink{struct_servo_instance}{Servo\+Instance}}
\end{DoxyCompactItemize}
\doxysubsubsection*{Macros}
\begin{DoxyCompactItemize}
\item 
\Hypertarget{servo__motor_8h_a52c96cf84195dc9a7834eeb42682fb78}\label{servo__motor_8h_a52c96cf84195dc9a7834eeb42682fb78} 
\#define {\bfseries SERVO\+\_\+\+MOTOR\+\_\+\+CNT}~7
\end{DoxyCompactItemize}
\doxysubsubsection*{Enumerations}
\begin{DoxyCompactItemize}
\item 
\Hypertarget{servo__motor_8h_a92e47e28c7fd235f77bdf4a7395cd562}\label{servo__motor_8h_a92e47e28c7fd235f77bdf4a7395cd562} 
enum {\bfseries Servo\+\_\+\+Type\+\_\+e} \{ {\bfseries Servo180} = 0
, {\bfseries Servo270} = 1
, {\bfseries Servo360} = 2
 \}
\item 
\Hypertarget{servo__motor_8h_abbc9854705b587f355c6d1a245d3559f}\label{servo__motor_8h_abbc9854705b587f355c6d1a245d3559f} 
enum {\bfseries Servo\+\_\+\+Angle\+\_\+\+Type\+\_\+e} \{ {\bfseries Free\+\_\+\+Angle\+\_\+mode}
, {\bfseries Start\+\_\+mode}
, {\bfseries Final\+\_\+mode}
 \}
\end{DoxyCompactItemize}
\doxysubsubsection*{Functions}
\begin{DoxyCompactItemize}
\item 
\Hypertarget{servo__motor_8h_a89d133df5f27d1dc959d7360e6a8c0d7}\label{servo__motor_8h_a89d133df5f27d1dc959d7360e6a8c0d7} 
\mbox{\hyperlink{struct_servo_instance}{Servo\+Instance}} \texorpdfstring{$\ast$}{*} {\bfseries Servo\+Init} (\mbox{\hyperlink{struct_servo___init___config__s}{Servo\+\_\+\+Init\+\_\+\+Config\+\_\+s}} \texorpdfstring{$\ast$}{*}Servo\+\_\+\+Init\+\_\+\+Config)
\item 
void \mbox{\hyperlink{servo__motor_8h_ac4157b72fa36b65b683660b86b9da612}{Servo\+\_\+\+Motor\+\_\+\+Free\+Angle\+\_\+\+Set}} (\mbox{\hyperlink{struct_servo_instance}{Servo\+Instance}} \texorpdfstring{$\ast$}{*}Servo\+\_\+\+Motor, int16\+\_\+t S\+\_\+angle)
\begin{DoxyCompactList}\small\item\em 写入自由角度数值 \end{DoxyCompactList}\item 
void \mbox{\hyperlink{servo__motor_8h_a871a49699fa114b54020843e1e149f25}{Servo\+\_\+\+Motor\+\_\+\+Type\+\_\+\+Select}} (\mbox{\hyperlink{struct_servo_instance}{Servo\+Instance}} \texorpdfstring{$\ast$}{*}Servo\+\_\+\+Motor, int16\+\_\+t mode)
\begin{DoxyCompactList}\small\item\em 舵机模式选择 \end{DoxyCompactList}\item 
\Hypertarget{servo__motor_8h_a358e789daa68380f02b5c7cc5f79903b}\label{servo__motor_8h_a358e789daa68380f02b5c7cc5f79903b} 
void {\bfseries Serveo\+Motor\+Control} ()
\begin{DoxyCompactList}\small\item\em 舵机输出控制 \end{DoxyCompactList}\end{DoxyCompactItemize}


\doxysubsection{Detailed Description}
舵机控制头文件 

\begin{DoxyAuthor}{Author}
panrui 
\end{DoxyAuthor}
\begin{DoxyVersion}{Version}
0.\+1 
\end{DoxyVersion}
\begin{DoxyDate}{Date}
2022-\/12-\/12
\end{DoxyDate}
\begin{DoxyCopyright}{Copyright}
Copyright (c) 2022 
\end{DoxyCopyright}


\label{doc-func-members}
\Hypertarget{servo__motor_8h_doc-func-members}
\doxysubsection{Function Documentation}
\Hypertarget{servo__motor_8h_ac4157b72fa36b65b683660b86b9da612}\index{servo\_motor.h@{servo\_motor.h}!Servo\_Motor\_FreeAngle\_Set@{Servo\_Motor\_FreeAngle\_Set}}
\index{Servo\_Motor\_FreeAngle\_Set@{Servo\_Motor\_FreeAngle\_Set}!servo\_motor.h@{servo\_motor.h}}
\doxysubsubsection{\texorpdfstring{Servo\_Motor\_FreeAngle\_Set()}{Servo\_Motor\_FreeAngle\_Set()}}
{\footnotesize\ttfamily \label{servo__motor_8h_ac4157b72fa36b65b683660b86b9da612} 
void Servo\+\_\+\+Motor\+\_\+\+Free\+Angle\+\_\+\+Set (\begin{DoxyParamCaption}\item[{\mbox{\hyperlink{struct_servo_instance}{Servo\+Instance}} \texorpdfstring{$\ast$}{*}}]{Servo\+\_\+\+Motor}{, }\item[{int16\+\_\+t}]{S\+\_\+angle}{}\end{DoxyParamCaption})}



写入自由角度数值 


\begin{DoxyParams}{Parameters}
{\em Servo\+\_\+\+Motor} & 注册的舵机实例 \\
\hline
{\em S\+\_\+angle} & 改变自由模式设定的角度 \\
\hline
\end{DoxyParams}
\Hypertarget{servo__motor_8h_a871a49699fa114b54020843e1e149f25}\index{servo\_motor.h@{servo\_motor.h}!Servo\_Motor\_Type\_Select@{Servo\_Motor\_Type\_Select}}
\index{Servo\_Motor\_Type\_Select@{Servo\_Motor\_Type\_Select}!servo\_motor.h@{servo\_motor.h}}
\doxysubsubsection{\texorpdfstring{Servo\_Motor\_Type\_Select()}{Servo\_Motor\_Type\_Select()}}
{\footnotesize\ttfamily \label{servo__motor_8h_a871a49699fa114b54020843e1e149f25} 
void Servo\+\_\+\+Motor\+\_\+\+Type\+\_\+\+Select (\begin{DoxyParamCaption}\item[{\mbox{\hyperlink{struct_servo_instance}{Servo\+Instance}} \texorpdfstring{$\ast$}{*}}]{Servo\+\_\+\+Motor}{, }\item[{int16\+\_\+t}]{mode}{}\end{DoxyParamCaption})}



舵机模式选择 


\begin{DoxyParams}{Parameters}
{\em Servo\+\_\+\+Motor} & 注册的舵机实例 \\
\hline
{\em mode} & 需要选择的模式 \\
\hline
\end{DoxyParams}
